package co.gov.medellin.ssti.sub.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import co.gov.medellin.ssti.sub.model.dao.exception.DAOException;
import co.gov.medellin.ssti.sub.model.dao.impl.AreaDAOImpl2;
import co.gov.medellin.ssti.sub.model.vo.AreaVO;

@Service
public class Area2Service {
	@Autowired
	AreaDAOImpl2 areaDAOImpl2;

	public List<AreaVO> findAreas(String strNombreArea) throws DAOException {
		try {
			return areaDAOImpl2.findAreas(strNombreArea);
		} catch (Exception e) {
			throw new DAOException(e);
		}
	}

	public List<AreaVO> findAllAreas() throws DAOException {
		try {
			return areaDAOImpl2.findAllAreas();
		} catch (Exception e) {
			throw new DAOException(e);
		}
	}
}
